<include file="Finance:leftmenu" />
<div class="content-right fl">
    <h1 class="content-right-title">面膜进货量</h1>
        <form action="" method="get" name="form1">
           <select id="year" name="year" class="select " id="year">
                <option value="2016" <?php echo ($year == "2016") ? "selected" : "";?>>2016年</option>
                <option value="2017" <?php echo ($year == "2017") ? "selected" : "";?>>2017年</option>
                <option value="2018" <?php echo ($year == "2018") ? "selected" : "";?>>2018年</option>
                <option value="2019" <?php echo ($year == "2019") ? "selected" : "";?>>2019年</option>
                <option value="2020" <?php echo ($year == "2020") ? "selected" : "";?>>2020年</option>
            </select>
            <select id="month" name="month" class="select " id="month">
                <option value="1" <?php echo ($month == "1") ? "selected" : "";?>>1月</option>
                <option value="2" <?php echo ($month == "2") ? "selected" : "";?>>2月</option>
                <option value="3" <?php echo ($month == "3") ? "selected" : "";?>>3月</option>
                <option value="4" <?php echo ($month == "4") ? "selected" : "";?>>4月</option>
                <option value="5" <?php echo ($month == "5") ? "selected" : "";?>> 5月</option>
                <option value="6" <?php echo ($month == "6") ? "selected" : "";?>>6月</option>
                <option value="7" <?php echo ($month == "7") ? "selected" : "";?>>7月</option>
                <option value="8" <?php echo ($month == "8") ? "selected" : "";?>>8月</option>
                <option value="9" <?php echo ($month == "9") ? "selected" : "";?>>9月</option>
                <option value="10" <?php echo ($month == "10") ? "selected" : "";?>>10月</option>
                <option value="11" <?php echo ($month == "11") ? "selected" : "";?>>11月</option>
                <option value="12" <?php echo ($month == "12") ? "selected" : "";?>>12月</option>
            </select>
             <button class="btn btn-primary"><i class="gicon-search white"></i>查询</button>
             <a href="/admin/finance/mianmo" class="btn btn-warning">清除查询</a>
             <a class="btn btn-success" href="javascript:excel();"><i class="gicon-share white"></i>导出</a>
            </form>
            
    <div class="tablesWrap">
        <table class="wxtables">
         	<colgroup>
         	 	<col width="5%">
               <col width="5%">
               <col width="5%">
                <col width="5%">
            </colgroup>
            <thead>
            <tr>
                <td>用户id</td>
                <td>用户名</td>
                <td>进货量</td>
                <td>应得奖金</td>
            </tr>
            </thead>
            <tbody>
            <?php foreach($list as $k=>$v){ ?>
               <tr>
	                <td><?php echo $v['uid'];?></td>
	                <td><?php echo $v['realname']?$v['realname']:$v['nickname'];?></td>
	                <td><?php echo $v['ningjiao'];?></td>
	                <td><?php echo $v['money']?$v['money']:0;?></td>
                </tr>
            <?php } ?>  
            </tbody>
        </table>
	<div class="tables-btmctrl clearfix">
           <div class="mgt10">
               <div class="paginate">
                  {$page}
               </div>
           </div>
	</div>
    </div>

</div>
<script>
function excel(){

    var year = $("#year").val();
    var month = $("#month").val();
    
    var url = "/admin/finance/excel?"
    		+"goods_id=2"
            +"year="+year
            +"&month="+month;
    
    layer.msg('正在导出,请耐心等待...', {icon: 16});
    
    window.location.href = url;
    
}
</script>
